package com.kukudexin.producerdata;

/**
 * @author: 酷酷的鑫
 * @Date: 2022/1/24 9:48
 * @description:
 */
public class ProducerThread extends Thread{
    //生产者生产数据就是调用 ValueOP 类的 setValue 方法给 value 字段赋值
    private ValueOP obj;

    public ProducerThread(ValueOP obj) {
        this.obj = obj;
    }

    @Override
    public void run() {
        while (true){
            obj.setValue();
        }
    }
}
